import pymysql

class py():
    def __init__(self):
        self.asd = pymysql.connect(
            host='10.59.9.12',
            user='root',
            password='yidong666',
            database='a3mall'
        )
        self.cur = self.asd.cursor()
    def select(self,sql):
        self.cur.execute(sql)
        return self.cur.fetchall()
    def cloce(self):
        self.cur.close()
        self.asd.close()